Chart API

Description

Alpha Anywhere includes a powerful built-in charting engine that uses the charting capabilities of Microsoft .NET Framework 4. You can program the charting engine directly using the API described on this page, or create charts in a builder, described at Chart Control. Using the API gives you the maximum amount of flexibility, but using the builder you can produce most commonly-used charts quickly and easily.

a5_chart_data_url_generate() Function

Generates the REST URI string that describes the chart to be drawn by the .NET Framework System.Web.UI.DataVisualization.Charting.Chart class(external link) (via the Alpha Anywhere Charting::Chart Class discussed below).

dim objSettings as Reporting::ReportChart
objSettings.chartType = "Pie"
dim uri as c = a5_chart_data_url_generate(objSettings,PieChart((,500,300(

See a5_chart_data_url_generate Function for the full description of the parameters. See Using Charts in Xdialogs and the Charting section of the Learning Xdialog Alpha Anywhere sample project for the PieChart() sample code and other chart generation functions.

Charting::Chart Class

Interpreter that reads a REST URI that specifies a chart and in turn uses the .NET Framework System.Web.UI.DataVisualization.Charting.Chart class to render a chart.

Charting::ChartDataDefinition Class

  • Properties

    dim title as c
    dim xAxisLabel as c
    dim yAxisLabel as c
    dim series[0] as Charting::ChartSeriesDefinition
    dim dataAxisLabels[0] as c 
    dim includeZero as c
    dim showBreaks as l

Charting::ChartSeriesDefinition Class

  • Properties

    dim label as c
    dim data[0] as Charting::ChartValueDefinition

Charting::ChartValueDefinition

  • Properties

    dim value as a
    dim label as c
    dim exploded as l
  • Methods

    function ValueType as c((
         helptext "Returns type of point - Y, XY, X, Stock, Box."
    end function
    function SetXY as v( x as n , y as n (
         helptext "Sets X/Y Value for chart."
    end function
    function SetX as v( value as n (
         helptext "Sets X Value for chart."
    end function
    function SetStock as v( high as n, low as n, open as n, close as n(
         helptext "Generate a stock data point."
    end function
    function SetBoxPlot as v( lowerWhisker as n, upperWhisker as n, LowerBox as n, UpperBox as n , Average as n, Median as n (
         helptext "Generate a box plot."
    end function
    function AddBoxPlotUnusual as v( value as n (
         helptext "Add an unusual value to a box plot value."
    end function
    function DataToString as c((
         helptext "Convert the data to string (multiple data elements, like xy values, are comma separated)."
    end function

Charting::ChartValuesDefinition

  • Properties

    dim values[0] as n
  • Methods

    function ValueType as c((
         helptext "Returns type of point - X, Stock, Box."
    end function
    function SetX as v( value as n (
         helptext "Sets X Value for chart."
    end function
    function SetStock as v( high as n, low as n, open as n, close as n(
         helptext "Generate a stock data point."
    end function
    function SetBoxPlot as v( lowerWhisker as n, upperWhisker as n, LowerBox as n, UpperBox as n , Average as n, Median as n (
         helptext "Generate a box plot."
    end function
    function AddBoxPlotUnusual as v( value as n (
         helptext "Add an unusual value to a box plot value."
    end function
    function DataToString as c((
         helptext "Convert the data to string (multiple data elements, like xy values, are comma separated)."
    end function

Charting::ChartXYValueDefinition

  • Properties

    dim x as n
    dim y as n
  • Methods

    function ValueType as c((
         helptext "Sets X Value for chart."
    end function
    function SetXY as v( x as n , y as n (
         helptext "Sets X/Y Value for chart."
    end function
    function DataToString as c((
         helptext "Convert the data to string (multiple data elements, like xy values, are comma separated)."
    end function

Reporting::ReportChart Class

  • Properties

    dim ChartProvider as c
    dim ChartType as c
    dim Chart3d as l
    dim ChartEffect as c
    dim sourceType as c
    dim sourceTable as c
    dim sourceConnection as c
    dim sourceSQLSelect as c
    dim sourceSQLPortable as l
    dim sourceArguments as c
    dim sourceArgumentBindings as c
    dim customExpression as c
    dim filterExpression as c
    dim DataExpression as c
    dim DataSeriesColumns as c
    dim DataLabelExpression as c
    dim DataLabelPlacement as c
    dim CategoryExpression as c
    dim CategoryLabelExpression as c
    dim titleExpression as c
    dim xAxisTitleExpression as c
    dim yAxisTitleExpression as c
    dim eachGroup as c
    dim overGroup as c
    dim eachExpression as c
    dim seriesType as c
    dim seriesGroup as c
    dim seriesExpression as c
    dim seriesLabelExpression as c
    dim sliceExplodeExpression as c
    dim PlotSeriesOnAxis as l
    dim Summarization as c
    dim includeZero as c
    dim showBreaks as l
    dim outputFormat as c
    dim width as n
    dim height as n
    dim styleSheet as c
  • Methods

    function Load as V( definition as c (
       helptext "Generate a stock data point."
    end function
    function Save as C((
       helptext "Generate a box plot."
    end function
    function GenerateURL as c(obj as p = null_value((( 
       helptext "Add an unusual value to a box plot value."
    end function
    function GenerateFormat as c(obj as p( 
       helptext "Convert the data to string (multiple data elements, like xy values, are comma separated)."
    end function
    function GenerateSampleURL as c((
       helptext "Returns X/Y."
    end function       
    function )static) ReportChartGenerateURL as c( definition as c , obj as p( 
       helptext "Sets X/Y Value for chart."
    end function
    function )static) ReportChartSampleURL as c( definition as c ( 
       helptext "Convert the data to string (multiple data elements, like xy values, are comma separated)."
    end function
    function )static) MergeDefinition as c( definition as c , override as c ( 
       helptext "Create a new report chart object (meta data for a chart)."
    end function
    function )static) ReportChartExprRegister as c(definition as c , obj as p(
       helptext "Create a chart object definition that can be embedded into an html report."
    end function

Examples

See Using Charts in Xdialogs and the Charting section of the Learning Xdialog Alpha Anywhere sample project.

See Also